package com.kotlin.android.api.base

/**
 *
 * Created on 2020-04-21.
 *
 * @author o.s
 */
open class BaseUIModel<T>(
    var showLoading: Boolean = false, // 显示/隐藏loading
    var isRefresh: Boolean = false, // true:需要刷新
    var loadMore: Boolean = false, // true:加载更多
    var needLogin: Boolean = false, // true:需要登录
    var error: String? = null, // 接口响应失败
    var netError: String? = null, // 接口响应失败
    var isEmpty: Boolean = false, // 数据为空
    var success: T? = null // 接口响应成功
) {

    override fun toString(): String {
        return "${javaClass.simpleName} :: " +
                "\nshowLoading = $showLoading, " +
                "\nisRefresh = $isRefresh, " +
                "\nloadMore = $loadMore, " +
                "\nneedLogin = $needLogin, " +
                "\nerror = $error, " +
                "\nnetError = $netError, " +
                "\nisEmpty = $isEmpty, " +
                "\nsuccess = $success, " +
                "\n"
    }
}